|
![](/i/fill.gif) |
Playing with the animation stuff, I produced this simple scene:
#version unofficial MegaPov 0.5;
camera
{
location <0.0, 0, -4>
look_at <0.0, 0.0, 0.0>
}
light_source
{
<-4, 8, -4>
rgb .3
}
text
{
ttf "ALIANNA.TTF",
"RAYTRACING"
1, <0.0, 0.0, 0.0>
align_center
pigment { color rgb <0, 1, 0> }
rotate <0,-20*(sin(clock*360)),0>
}
As I understand it, this should produce a nice loop; starting from no
rotation (clock = 0, sin(0) = 0), the right end of the text should be
rotated toward the camera while the left end falls away until a quarter
of the way through the animation, where the rotation reaches -20 degrees
(clock = ~.25, sin(360*.25) = 1). Then, it should rotate back the way it
came until halfway through (sin(360*.5) = 0) and then keep rotating that
direction until 3/4 of the way through the animation where it reaches 20
degrees (sin(360*.75) = -1). And finally, it should rotate back again
until it reaches no rotation.
Problem: it doesn't do this. It seems like the sin function is returning
incorrect values, since when I rendered the animation and dumped the
frames in a GIF animator, the animation didn't describe a full loop.
Instead, it acted as though the function had been sin(clock*270),
starting from no rotation and ending up at 20 degrees rotation.
Can anyone either explain what I'm doing wrong, or reproduce this bug?
--
Xplo Eristotle
http://start.at/xplosion/
"And then one day you find ten years have got behind you
No one told you when to run, you missed the starting gun"
-Pink Floyd
Post a reply to this message
|
![](/i/fill.gif) |